import request from '../utils/request'


/*分页获取商品列表*/
export function getGoodsByPage(params){
  return request({
    method:'get',
    url:'goods',
    params
  })
}


/*添加商品*/
export function addGoods(data){
  return request({
    method:'post',
    url:'goods',
    data
  })
}

/*修改商品*/
export function updateGoods(id,data){
  return request({
    method:'put',
    url:'goods/'+id,
    data
  })
}



/*删除商品*/
export function deleteGoods(id){
  return request({
    method:'delete',
    url:'goods/'+id
  })
}